function audioSignal=create_track(midi,data)
    Fs = 44100;
    [mf s e mv] = midi2fse(midi,1); %frequency start end.
    f = mf2f(mf);
    a=mv2a(mv);
    songEnd = max(e);
    
    [s e]= chord_adjustment(s,e,0.015);

    
    audioSignal = zeros(round(songEnd*Fs)+1,1);
    
    for k=1:length(s)

        audioActual =a(k)*Karplus_Strong(f(k),e(k)-s(k),data,Fs);
        %audioActual =a(k)* bumbumbum(f(k),Fs,e(k)-s(k),data);%plucked_string(f(k),e(k)-s(k),data,Fs);
        %audioActual = drums(f(k) ,e(k)-s(k), 0, Fs);
        
        %audioActual = a(k)*campanas(f(k),e(k)-s(k));
        
        %audioActual = audioActual';
          
        l=(length(audioActual)+round(s(k)*Fs)+1)-length(audioSignal)-1;
          if l>0
              audioSignal=[audioSignal;zeros(l,1)];
          end
         
         audioSignal(round(s(k)*Fs)+1:round(s(k)*Fs)+length(audioActual)) = audioSignal(round(s(k)*Fs)+1:round(s(k)*Fs)+length(audioActual))+audioActual;
    end
    
        
    if ~isempty(data.instrument)
        audioSignal=conv(audioSignal,data.instrument);
    end
    audioSignal=audioSignal/max(abs(audioSignal));
    

    
end